$(document).ready(function () {
    // 获取一言
    $.get('https://v1.hitokoto.cn/', function (data) {
        $('#hitokoto_text').text(data.hitokoto);
    });

    // 打开链接
    window.openLink = function(type) {
        const links = {
            blog: "http://101.34.242.206:9990/blog.html",
            github: "https://github.com",
            mail: "https://mail.qq.com"
        };
        window.open(links[type], "_blank");
    };
    // 初始化 APlayer
    new APlayer({
        container: document.getElementById('aplayer'),
        fixed: false,
        autoplay: false,
        audio: [{
            name: 'Dance Monkey',
            artist: 'Tones and I',
            url: 'music/Dance Monkey-Tones and I.320.mp3', // 本地音乐文件路径
            cover: 'https://bu.dusays.com/2021/12/11/3624ee0d80221.png'
        }]
    });
});

